//
//  ZZGroupBuyController.m
//  NetesaeLottery
//
//  Created by 周英培 on 16/8/2.
//  Copyright © 2016年 周英培. All rights reserved.
//

#import "ZZGroupBuyController.h"
#import "ZZGroupBuyBtn.h"
@interface ZZGroupBuyController ()

@property (nonatomic,weak) UIView *blueV;

@end

@implementation ZZGroupBuyController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    //MARK:蓝色视图
    UIView *blueView = [[UIView alloc] initWithFrame:CGRectMake(0, 64, self.view.width, 0)];
    
    blueView.backgroundColor = [UIColor blueColor];
    
    [self.view addSubview:blueView];
    
    _blueV = blueView;
    
    
}

- (IBAction)allCategoryBtnClick:(ZZGroupBuyBtn *)sender {

    CGFloat newHeight;
    
    CGAffineTransform newForm = CGAffineTransformIdentity;
    
    if (self.blueV.height == 0) {
        
        newHeight = 200;
        
        newForm = CGAffineTransformMakeRotation(M_PI *0.99);
        
    } else {
    
        newHeight = 0;
        
        newForm = CGAffineTransformIdentity;
    
    }
    
    [UIView animateWithDuration:0.5 animations:^{
        
        sender.imageView.transform = newForm;
        
        self.blueV.height = newHeight;
        
    }];

}


@end
